<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .ff {
            width: 100px;
            height: 100px;
            /* background: pink; */
            transition: all 1s;
        }

        .ff:hover {
            transform: translate(100px);
        }
    </style>
</head>

<body>

    <script>
        let obj = {
            name: '马楼',
            ff: function () {
                document.write(`<div class="ff"><img src="../image/preview.gif"></div>`)
            }
        }
        document.write(obj.name)
        obj.ff()
    </script>
</body>

</html>